projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c04190e
)
textlayout: Allow querying empty areas
author
Benjamin Otte
<otte@redhat.com>
Thu, 28 Mar 2019 23:24:00 +0000
(
00:24
+0100)
committer
Benjamin Otte
<otte@redhat.com>
Fri, 29 Mar 2019 08:56:52 +0000
(09:56 +0100)
This only happens when the textview has no content, but it does happen
now that such a textview gets allocated 0x0 and not 1x1.
gtk/gtktextlayout.c
patch
|
blob
|
history
diff --git
a/gtk/gtktextlayout.c
b/gtk/gtktextlayout.c
index 51ac51a3b6e54e194bb1543b4ed02dba8e8e6312..7947eadcf803dfcdf7b7dd6aea28ed31ee00168d 100644
(file)
--- a/
gtk/gtktextlayout.c
+++ b/
gtk/gtktextlayout.c
@@
-722,7
+722,9
@@
gtk_text_layout_get_lines (GtkTextLayout *layout,
GSList *retval;
g_return_val_if_fail (GTK_IS_TEXT_LAYOUT (layout), NULL);
- g_return_val_if_fail (bottom_y > top_y, NULL);
+
+ if (top_y <= bottom_y)
+ return NULL;
retval = NULL;